pub type Point = (f64, f64);
pub type Func = fn(f64, f64, f64, f64) -> f64;
// (start point, control point1, control point2, end point)
pub type BezierCurve = (Point, Point, Point, Point);

#[derive(Debug, Clone)]
pub enum EaseCurve {
    Segment(Vec<TransitionCurveSegment>),
    FuncHashMap(&'static str),
    ArrayHashMap(String),
}

impl Default for EaseCurve {
    fn default() -> Self {
        Self::FuncHashMap(super::LINEAR)
    }
}

#[derive(Debug, Clone, Copy)]
pub enum TransitionCurveSegment {
    OnePoint(Point),
    ThreePoints((Point, Point, Point)), // (main point, last control point, next control point)
}

impl Default for TransitionCurveSegment {
    fn default() -> Self {
        Self::OnePoint((0., 0.))
    }
}
